package demo.pattern.command;

/**
 * @author : GuoFei
 * @since : 2019/6/25 17:22
 */
public class TwoApplication {

    public static void main(String[] args) {
        Stock stock = new Stock();

        Order buyOrder = new BuyStock(stock);
        Order sellOrder = new SellStock(stock);

        Broker broker = new Broker();
        broker.takeOrder(buyOrder);
        broker.takeOrder(sellOrder);

        broker.placeOrders();
    }

}
